package org.movee.spring.data.hugegraph.repository.query;

import org.movee.spring.data.hugegraph.gremlin.GremlinTraversal;
import org.movee.spring.data.hugegraph.mapping.HugePersistentEntity;
import org.movee.spring.data.hugegraph.mapping.HugePersistentProperty;
import org.movee.spring.data.hugegraph.query.paramerter.HugeParameterAccessor;
import lombok.RequiredArgsConstructor;
import org.springframework.data.mapping.context.MappingContext;

@RequiredArgsConstructor
public class QueryHugeTraversalCreator {

    private final HugeQueryMethod queryMethod;

    private final MappingContext<? extends HugePersistentEntity<?>, HugePersistentProperty> mappingContext;

    public GremlinTraversal traversal(StringBasedQuery stringBasedQuery, HugeParameterAccessor parameterAccessor) {

        return stringBasedQuery.bindQuery(parameterAccessor, queryMethod);
    }

}
